@model Net8.Identity.MvcClient.Models.ErrorViewModel
@{
    ViewData["Title"] = "错误";
}

<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8 col-lg-6">
            <div class="card mt-5">
                <div class="card-header bg-danger text-white">
                    <h3 class="mb-0">
                        <i class="bi bi-exclamation-triangle me-2"></i>发生错误
                    </h3>
                </div>
                
                <div class="card-body text-center">
                    <div class="mb-4">
                        <i class="bi bi-exclamation-triangle text-danger" style="font-size: 4rem;"></i>
                    </div>
                    
                    <h4 class="text-danger mb-3">认证出现问题</h4>
                    <p class="text-muted mb-4">在处理您的认证请求时发生了错误</p>

                    @if (!string.IsNullOrEmpty(Model?.Error))
                    {
                        <div class="alert alert-danger text-start">
                            <h6 class="alert-heading">错误类型</h6>
                            <p class="mb-0"><strong>@Model.Error</strong></p>
                            @if (!string.IsNullOrEmpty(Model.ErrorDescription))
                            {
                                <p class="mb-0 mt-2">@Model.ErrorDescription</p>
                            }
                        </div>
                    }

                    <div class="d-grid gap-2 d-md-flex justify-content-md-center">
                        <a href="~/" class="btn btn-primary">
                            <i class="bi bi-house me-2"></i>返回首页
                        </a>
                        <button onclick="history.back()" class="btn btn-outline-secondary">
                            <i class="bi bi-arrow-left me-2"></i>返回上页
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>